<?php
include "dbfunc.php";
$dbconn=init_db();
$userid=3;
$sql="select * from goods where user_id=".$userid;
$res=mysql_query($sql);
if(!$res){
 echo mysql_error();
 exit;
}

?>
<html>
<head>
<title>列表</title>
<?php the_header();?>
</head>
<body>
<?php
 while($row=mysql_fetch_array($res)) {
   echo "<div>";
   echo "<img src=\"./theme/noimage.gif\" />";
   echo "<a href=\"item.php?id=".$row["id"]."\">";
   echo  $row["title"];
   echo "</a>";
   echo "</div>";
 }
?>
</body>
</html>